<template>
  <div class="app-container">
    <el-card >
      <el-table :data="projectMaterial" border stripe>
        <el-table-column type="index" label="#"> </el-table-column>
        <el-table-column label="代码" prop="code"></el-table-column>
        <el-table-column label="规格" prop="specification"></el-table-column>
        <el-table-column label="计量单位" prop="unit"></el-table-column>
        <el-table-column label="数量" prop="serialNumber"></el-table-column>
        <el-table-column label="合同单价" prop="unitContractPrice">
        </el-table-column>
        <el-table-column label="单位价格" prop="unitPrice"> </el-table-column>
        <el-table-column label="计算合价" prop="combinedPrice">
        </el-table-column>
        <el-table-column label="预算单价" prop="budgetUnitPrice">
        </el-table-column>
        <el-table-column label="单价备注" prop="remark"> </el-table-column>
        <el-table-column label="下单比例" prop="projectType"> </el-table-column>
        <el-table-column label="已下单数量" prop="projectType">
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
import { listMaterial, getMaterial, getDetails } from "@/api/system/material";

export default {
  name: "Material",
  components: {},
  data() {
    return {
      projectMaterial: [],
      // bePassId: '',
      dialogVisible: false
    };
  },
  created() {
    this.getList();
    // this.getDetailMaterial()
  },
  methods: {
    async getList() {
      try {
        const res = await listMaterial()
        console.log(res)
        this.projectMaterial = res.rows
      } catch (e) {
        console.log(e)
      }
    }
    // async getDetailMaterial() {
    //   // this.bePassId = this.$route.query.id
    //   this.loading = true;
    //   try {
    //     let id = this.$route.query.id
    //   console.log(typeof id);
    //   const res = await getDetails(id)
    //
    //     console.log("无聊页面返回数据！", res)
    //
    //   // console.log("详情响应数据！", res);
    //   this.projectMaterial = res.data.materialList
    //   } catch (error) {
    //
    //   }
    // }
  },
};
</script>
